import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Stack;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 言初
 * Date: 2023-02-07
 * Time: 11:40
 */
public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.addLast(5);
        myLinkedList.addLast(6);
        myLinkedList.display();
        System.out.println();
        myLinkedList.addIndex(2,6);
        myLinkedList.display();
        System.out.println();
        System.out.println(myLinkedList.contains(4));
        System.out.println(myLinkedList.contains(10));
        myLinkedList.remove(3);
        //myLinkedList.remove(6);
        myLinkedList.display();
        System.out.println();
        myLinkedList.removeAllKey(6);
        myLinkedList.display();
        System.out.println();
        myLinkedList.clear();
        myLinkedList.display();
    }
}
